package main

import (
	"fmt"
	"path"
	"runtime"
)

// runtime.Caller()

func f1(){
	pc, file, line, ok := runtime.Caller(1)
	if !ok{
		fmt.Println("runtime.Caller() failed")
		return
	}
	funcName := runtime.FuncForPC(pc).Name()
	fmt.Println(funcName)
	fmt.Println(pc)
	fmt.Println(file)	// C:/Code/Golang/src/tansi/day06/06runtime/split.go
	fmt.Println(path.Base(file))
	fmt.Println(line)
}

func main(){
	f1()
}

